<extend name="Public:innerbase"/>
<block name="css">
<link rel="stylesheet" href="{:STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{:STATICS}/kindeditor/plugins/code/prettify.css" />
</block>
<!--link rel="stylesheet" href="{:STATICS}/vote/style.css" /-->
<block name="js">
<include file="Public:upload" />
<script src="{:STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{:STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{:STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script src="{:RES}/js/date/WdatePicker.js" type="text/javascript"></script>
<script src="{:STATICS}/vote/common.js" type="text/javascript"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	editor = K.create('#info', {
	resizeType : 1,
	allowPreviewEmoticons : false,
	allowImageUpload : true,
	uploadJson : '/index.php?m=User&c=Qiniu&a=kindEditorUpload',
	items : [
	'source','undo','plainpaste','wordpaste','clearhtml','quickformat','selectall','fullscreen','fontname', 'fontsize','subscript','superscript','indent','outdent','|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','hr']
	});
});

$(function(){
	function check(el){
		if($(el).is(':checked')){
			$('#signEndTime').show();
		}
		else $('#signEndTime').hide();
	}
	check($('#onlineSign'));
	$('#onlineSign').change(function(){
		check(this);
	});

	function check1(el){
		if($(el).is(':checked')){
			$('#telphone').show();
		}
		else $('#telphone').hide();
	}
	check1($('#ontelphone'));
	$('#ontelphone').change(function(){
		check1(this);
	});
})
</script>
</block>
<block name="content">
<div class="container-fluid">
<div class="page-header">
	
</div>
<code><?php echo C('WAP_DOMAIN').'/wap/Ktv/index?token='.session('token');?></code>
<div style="margin-top:10px;">
	<form class="form-horizontal" method="post" action="">
		<if condition="$vo['id'] neq ''">
		  <input type="hidden" name="id" value="{$vo['id']}">
		</if>
		<div class="form-group">
			<label class="control-label col-xs-2">ktv名称</label>
			<div class="col-md-4">
				<input type="text" name="title" value="{$vo.title}" class="form-control">
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">关注引导地址：</label>
			<div class="col-md-4">
				<input type="text" name="signurl" value="{$vo.signurl}" class="form-control" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">门店图片</label>
			<div class="col-md-4">
				<input type="hidden" name="banner" value="{$vo.banner}" class="form-control" id="img" style="display:inline-block;width:250px;" />
				<img id="imgHolder" style="width:216px;" class="img" src="{$vo.banner}"/>
				<div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('img',720,400)">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('img')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">头部优惠图片</label>
			<div class="col-md-4">
				<img id="banner2Holder" style="width:216px;" class="img" src="{$vo.banner2}"/>
				<input type="hidden" name="banner2" value="{$vo.banner2}" class="form-control" id="banner2" />
				<div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('banner2')">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('banner2')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
				</div>
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">头部链接地址</label>
			<div class="col-md-4">
				<input type="text" name="topurl" value="{$vo.topurl}" class="form-control" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">营业时间：</label>
			<div class="col-md-6">
				<input  value="{$vo.timemsg|default='14:00至05:00'}"  type="input" class="form-control"  name="timemsg">
			
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">分享标题：</label>
			<div class="col-md-4">
				<input type="text" name="share_title" value="{$vo.share_title}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">分享图片：</label>
			<div class="col-md-4">
				<img id="shareImgHolder" style="width:216px;" class="img" src="{$vo.share_img}"/>
				<input type="hidden" name="share_img" value="{$vo.share_img}" class="from-control" id="shareImg" />
				<div class="btn-group" style="vertical-align:bottom;">
					<span class="btn btn-xs btn-primary" onclick="selectAsset('shareImg',720,400)">
						<span class="glyphicon glyphicon-cloud-upload"></span>选择
					</span>
					<span class="btn btn-primary btn-xs" onclick="previewImg('shareImg')">
						<span class="glyphicon glyphicon-picture"></span>预览
					</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-xs-2">分享内容：</label>
			<div class="col-md-4">
				<input type="text" name="share_detail" value="{$vo.share_detail}" class="form-control" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">地址：</label>
			<div class="col-md-4">
				<input type="text" name="address" value="{$vo.address}" class="form-control" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="control-label col-xs-2">电话：</label>
			<div class="col-md-4">
				<input type="text" name="telphone" value="{$vo.telphone}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
		<label class="control-label col-xs-2">优惠信息：</label>
			
			<div class="col-md-4">
				<input type="text" name="msg" value="{$vo.msg}" class="form-control" />
			</div>
		</div>
		<div class="form-group">
		<label class="control-label col-xs-2">链接地址：</label>
			<div class="col-md-4">
				<input type="text" name="msgurl" value="{$vo.msgurl}" class="form-control" />
			</div>
		</div>
		
		<div class="form-group">
			<div class="col-md-4 col-xs-offset-2">
				<button type="submit" name="button" class="btn btn-success">保存</button>
			</div>
		</div>
	</form>
</div>
</div>
</block>